import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import echarts from 'echarts'
import axios from 'axios'



axios.defaults.baseURL="/api";
// axios.defaults.baseURL="http://localhost:20000";
axios.interceptors.request.use((req)=>{
  //获取token
  let token = localStorage.getItem("token");
  if(token!=null){
    req.headers.token=token;
  }
  return req;
});

Vue.prototype.$http = axios

Vue.prototype.$echarts = echarts
Vue.config.productionTip = false

Vue.use(ElementUI)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
